package com.uchiha.nova.mainService.provider;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 周林静
 * @version 1.0
 * @date 2021/10/28 18:32
 */
public class AuthProvider {
    public static final String TARGET = "/**";
    public static final String REPLACEMENT = "";
    public static final String AUTH_KEY = "nova-auth";
    public static final String AUTHORIZATION = "Authorization";
    private static final List<String> DEFAULT_SKIP_URL = new ArrayList<>();

    static {

        DEFAULT_SKIP_URL.add("/uca/oauth/token");
        DEFAULT_SKIP_URL.add("/uca/kaptcha/**");
        DEFAULT_SKIP_URL.add("/uca/oauth/refresh");
        DEFAULT_SKIP_URL.add("/**/doc.html");

        DEFAULT_SKIP_URL.add("/token/**");

    }

    /**
     * 默认无需鉴权的API
     */
    public static List<String> getDefaultSkipUrl() {
        return DEFAULT_SKIP_URL;
    }
}
